<template>
  <div id="box">
    <div class="main">
      <div class="div1">2021-09-10</div>
      <div
        class="mainNav"
        @click="$router.push('/admin/meal/history')"
        style="cursor: pointer"
      >
        查看订餐历史>
      </div>

      <div class="mainFooter">
        <span>
          <p>
            <span style="font-size: 25px"><strong>12</strong></span>
            <span>人</span>
          </p>
          <p>今日订餐人数</p>
        </span>
        <span>
          <span style="font-size: 25px"><strong>182.6</strong></span>
          <span>元</span>
          <p>今日订餐总价</p>
        </span>
        <span>
          <span style="font-size: 25px"><strong>78</strong></span>
          <span>人</span>
          <p>本周订餐人数</p>
        </span>
        <span>
          <span style="font-size: 25px"><strong>786.6</strong></span>
          <span>元</span>
          <p>本周订餐总价</p>
        </span>
      </div>
    </div>
    <div class="center">
      <div class="div1">今日套餐</div>
      <div
        class="mainNav"
        @click="$router.push('/admin/meal/food')"
        style="cursor: pointer"
      >
        菜品管理>
      </div>
      <div class="mainFooter">
        <span>
          <p>套餐A</p>
          <p>鱼香肉丝&nbsp;&nbsp;蚂蚁上树</p>
          <p>青菜肉圆&nbsp;&nbsp;糖醋排骨</p>
        </span>
        <span>
          <p>套餐A</p>
          <p>鱼香肉丝&nbsp;&nbsp;蚂蚁上树</p>
          <p>青菜肉圆&nbsp;&nbsp;糖醋排骨</p>
        </span>
        <span>
          <p>套餐A</p>
          <p>鱼香肉丝&nbsp;&nbsp;蚂蚁上树</p>
          <p>青菜肉圆&nbsp;&nbsp;糖醋排骨</p>
        </span>
        <span>
          <p>套餐A</p>
          <p>鱼香肉丝&nbsp;&nbsp;蚂蚁上树</p>
          <p>青菜肉圆&nbsp;&nbsp;糖醋排骨</p>
        </span>
      </div>
    </div>
    <div class="footer">
      <div class="div2">今日明细</div>
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="date" label="序号" width="180" align="center">
        </el-table-column>
        <el-table-column prop="name" label="订餐人" width="180" align="center">
        </el-table-column>
        <el-table-column prop="address" label="联系电话" align="center">
        </el-table-column>
        <el-table-column prop="xuan" label="所选套餐" align="center">
        </el-table-column>
      </el-table>
    </div>
    <el-pagination
      @current-change="onPageChange"
      background
      layout="prev, pager, next"
      :total="200"
      style="text-align: right; padding-bottom: 300px; margin-top: 20px"
    >
    </el-pagination>
    <div class="bottom" style="text-align: center">
      <p>Aoure原型设计与制作因为兴趣所以热爱</p>
      <p>We Chat: 13182887326</p>
      <p>文档末经授权禁止商业使用</p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.onPageChange();
  },
  methods: {
    async onPageChange(page = 1) {
      let ret = await this.$store.dispatch("foods/getUserList", page);
      console.log(ret);
      this.tableData = ret.data.tableData;
      // console.log(this.tableData);
    },
  },
};
</script>

<style lang="scss" scoped>
.main {
  height: 172px;
  background-color: rgba(228, 228, 228, 0.8);
  border: none;
  border-radius: 2px;
  box-shadow: none;
  margin-left: 50px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.mainNav {
  text-align: right;
  margin-right: 20px;
  font-size: 16px;
  margin-top: 10px;
  color: #63b9be;
}
.mainFooter {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 10px;
  span {
    font-size: 18px;
    font-weight: 600;
    text-align: center;

    p {
      margin-top: 8px;
    }
  }
}
.div1 {
  position: absolute;
  left: 25px;
  top: -20px;
  width: 141px;
  height: 41px;
  line-height: 41px;
  background: inherit;
  background-color: rgba(204, 0, 0, 0.807843137254902);
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(204, 0, 0, 1);
  border-radius: 3px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  font-family: "Arial Negreta", "Arial Normal", "Arial";
  font-weight: 700;
  font-style: normal;
  font-size: 16px;
  color: #ffffff;
  text-align: center;
}
.center {
  height: 172px;
  background-color: rgba(228, 228, 228, 0.8);
  border: none;
  border-radius: 2px;
  box-shadow: none;
  margin-left: 50px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.center > .mainFooter > span {
  background-color: white;
  font-size: 14px;
  padding: 15px;
}
.footer {
  margin-left: 50px;
  margin-top: 80px;
  position: relative;
  .div2 {
    position: absolute;
    left: 25px;
    top: -42px;
    width: 141px;
    height: 41px;
    line-height: 41px;
    background: inherit;
    background-color: rgba(204, 0, 0, 0.807843137254902);
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(204, 0, 0, 1);
    border-radius: 3px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    font-family: "Arial Negreta", "Arial Normal", "Arial";
    font-weight: 700;
    font-style: normal;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
  }
}
.bottom > p {
  margin-top: 5px;
  color: #999999;
}
.bottom {
  padding: 50px;
}
</style>